Optimal. Leaf size=95 \[ \frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+a b e x+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d}+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 95, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {6107, 12, 5916, 5980, 5910, 260, 5948} \[ \frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+a b e x+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d}+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 260
Rule 5910
Rule 5916
Rule 5948
Rule 5980
Rule 6107
Rubi steps
\begin {align*} \int (c e+d e x) \left (a+b \tanh ^{-1}(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int e x \left (a+b \tanh ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac {e \operatorname {Subst}\left (\int x \left (a+b \tanh ^{-1}(x)\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {(b e) \operatorname {Subst}\left (\int \frac {x^2 \left (a+b \tanh ^{-1}(x)\right )}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {(b e) \operatorname {Subst}\left (\int \left (a+b \tanh ^{-1}(x)\right ) \, dx,x,c+d x\right )}{d}-\frac {(b e) \operatorname {Subst}\left (\int \frac {a+b \tanh ^{-1}(x)}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=a b e x-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {\left (b^2 e\right ) \operatorname {Subst}\left (\int \tanh ^{-1}(x) \, dx,x,c+d x\right )}{d}\\ &=a b e x+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}-\frac {\left (b^2 e\right ) \operatorname {Subst}\left (\int \frac {x}{1-x^2} \, dx,x,c+d x\right )}{d}\\ &=a b e x+\frac {b^2 e (c+d x) \tanh ^{-1}(c+d x)}{d}-\frac {e \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {e (c+d x)^2 \left (a+b \tanh ^{-1}(c+d x)\right )^2}{2 d}+\frac {b^2 e \log \left (1-(c+d x)^2\right )}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 134, normalized size = 1.41 \[ e \left (\frac {a^2 (c+d x)^2}{2 d}+\frac {\left (a b+b^2\right ) \log (-c-d x+1)}{2 d}+\frac {\left (b^2-a b\right ) \log (c+d x+1)}{2 d}+\frac {a b (c+d x)}{d}+\frac {b (c+d x) \tanh ^{-1}(c+d x) (a (c+d x)+b)}{d}+\frac {\left (b^2 (c+d x)^2-b^2\right ) \tanh ^{-1}(c+d x)^2}{2 d}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.47, size = 191, normalized size = 2.01 \[ \frac {4 \, a^{2} d^{2} e x^{2} + 8 \, {\left (a^{2} c + a b\right )} d e x + 4 \, {\left (a b c^{2} + b^{2} c - a b + b^{2}\right )} e \log \left (d x + c + 1\right ) - 4 \, {\left (a b c^{2} + b^{2} c - a b - b^{2}\right )} e \log \left (d x + c - 1\right ) + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (b^{2} c^{2} - b^{2}\right )} e\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )^{2} + 4 \, {\left (a b d^{2} e x^{2} + {\left (2 \, a b c + b^{2}\right )} d e x\right )} \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.35, size = 369, normalized size = 3.88 \[ \frac {{\left (\frac {{\left (d x + c + 1\right )} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )^{2}}{d x + c - 1} - \frac {2 \, {\left (d x + c + 1\right )}^{2} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{{\left (d x + c - 1\right )}^{2}} + \frac {4 \, {\left (d x + c + 1\right )} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right )}{d x + c - 1} - 2 \, b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1} + 1\right ) + \frac {4 \, {\left (d x + c + 1\right )} a b e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d x + c - 1} + \frac {2 \, {\left (d x + c + 1\right )}^{2} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} b^{2} e \log \left (-\frac {d x + c + 1}{d x + c - 1}\right )}{d x + c - 1} + \frac {4 \, {\left (d x + c + 1\right )} a^{2} e}{d x + c - 1} + \frac {4 \, {\left (d x + c + 1\right )} a b e}{d x + c - 1} - 4 \, a b e\right )} {\left ({\left (c + 1\right )} d - {\left (c - 1\right )} d\right )}}{4 \, {\left (\frac {{\left (d x + c + 1\right )}^{2} d^{2}}{{\left (d x + c - 1\right )}^{2}} - \frac {2 \, {\left (d x + c + 1\right )} d^{2}}{d x + c - 1} + d^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.06, size = 390, normalized size = 4.11 \[ \frac {d \,x^{2} a^{2} e}{2}+x \,a^{2} c e +\frac {a^{2} c^{2} e}{2 d}+\frac {d \arctanh \left (d x +c \right )^{2} x^{2} b^{2} e}{2}+\arctanh \left (d x +c \right )^{2} x \,b^{2} c e +\frac {\arctanh \left (d x +c \right )^{2} b^{2} c^{2} e}{2 d}+\arctanh \left (d x +c \right ) x \,b^{2} e +\frac {\arctanh \left (d x +c \right ) b^{2} c e}{d}+\frac {e \,b^{2} \arctanh \left (d x +c \right ) \ln \left (d x +c -1\right )}{2 d}-\frac {e \,b^{2} \arctanh \left (d x +c \right ) \ln \left (d x +c +1\right )}{2 d}+\frac {e \,b^{2} \ln \left (d x +c -1\right )^{2}}{8 d}-\frac {e \,b^{2} \ln \left (d x +c -1\right ) \ln \left (\frac {1}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+\frac {e \,b^{2} \ln \left (d x +c -1\right )}{2 d}+\frac {e \,b^{2} \ln \left (d x +c +1\right )}{2 d}+\frac {e \,b^{2} \ln \left (d x +c +1\right )^{2}}{8 d}-\frac {e \,b^{2} \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right ) \ln \left (d x +c +1\right )}{4 d}+\frac {e \,b^{2} \ln \left (-\frac {d x}{2}-\frac {c}{2}+\frac {1}{2}\right ) \ln \left (\frac {1}{2}+\frac {d x}{2}+\frac {c}{2}\right )}{4 d}+d \arctanh \left (d x +c \right ) x^{2} a b e +2 \arctanh \left (d x +c \right ) x a b c e +\frac {\arctanh \left (d x +c \right ) a b \,c^{2} e}{d}+a b e x +\frac {a b c e}{d}+\frac {e a b \ln \left (d x +c -1\right )}{2 d}-\frac {e a b \ln \left (d x +c +1\right )}{2 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.60, size = 316, normalized size = 3.33 \[ \frac {1}{2} \, a^{2} d e x^{2} + \frac {1}{2} \, {\left (2 \, x^{2} \operatorname {artanh}\left (d x + c\right ) + d {\left (\frac {2 \, x}{d^{2}} - \frac {{\left (c^{2} + 2 \, c + 1\right )} \log \left (d x + c + 1\right )}{d^{3}} + \frac {{\left (c^{2} - 2 \, c + 1\right )} \log \left (d x + c - 1\right )}{d^{3}}\right )}\right )} a b d e + a^{2} c e x + \frac {{\left (2 \, {\left (d x + c\right )} \operatorname {artanh}\left (d x + c\right ) + \log \left (-{\left (d x + c\right )}^{2} + 1\right )\right )} a b c e}{d} + \frac {{\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (d x + c + 1\right )^{2} + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (-d x - c + 1\right )^{2} + 4 \, {\left (b^{2} d e x + {\left (c e + e\right )} b^{2}\right )} \log \left (d x + c + 1\right ) - 2 \, {\left (2 \, b^{2} d e x + 2 \, {\left (c e - e\right )} b^{2} + {\left (b^{2} d^{2} e x^{2} + 2 \, b^{2} c d e x + {\left (c^{2} e - e\right )} b^{2}\right )} \log \left (d x + c + 1\right )\right )} \log \left (-d x - c + 1\right )}{8 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 1.56, size = 432, normalized size = 4.55 \[ x\,\left (a\,e\,\left (b+3\,a\,c\right )-2\,a^2\,c\,e\right )+{\ln \left (1-d\,x-c\right )}^2\,\left (\frac {b^2\,c\,e\,x}{4}-\frac {b^2\,e-b^2\,c^2\,e}{8\,d}+\frac {b^2\,d\,e\,x^2}{8}\right )-\ln \left (1-d\,x-c\right )\,\left (\ln \left (c+d\,x+1\right )\,\left (\frac {b^2\,c\,e\,x}{2}-\frac {\frac {b^2\,e}{2}-\frac {b^2\,c^2\,e}{2}}{2\,d}+\frac {b^2\,d\,e\,x^2}{4}\right )-\frac {x\,\left (4\,b^2\,d^2\,e\,\left (c-1\right )-4\,b^2\,d\,e\,\left (d\,\left (c-1\right )+d\,\left (c+1\right )\right )+8\,b^2\,c\,d^2\,e\right )}{16\,d^2}+\frac {x\,\left (8\,b\,d^2\,e\,\left (4\,a\,c-2\,a+b\,c\right )+4\,b\,d^2\,e\,\left (4\,a+b\right )\,\left (c+1\right )-4\,b\,d\,e\,\left (d\,\left (c-1\right )+d\,\left (c+1\right )\right )\,\left (4\,a+b\right )\right )}{16\,d^2}-\frac {b^2\,d\,e\,x^2}{8}+\frac {b\,d\,e\,x^2\,\left (4\,a+b\right )}{8}\right )+{\ln \left (c+d\,x+1\right )}^2\,\left (\frac {b^2\,c\,e\,x}{4}-\frac {b^2\,e-b^2\,c^2\,e}{8\,d}+\frac {b^2\,d\,e\,x^2}{8}\right )+\frac {\ln \left (c+d\,x+1\right )\,\left (e\,b^2\,c+e\,b^2+a\,e\,b\,c^2-a\,e\,b\right )}{2\,d}+\frac {\ln \left (c+d\,x-1\right )\,\left (-e\,b^2\,c+e\,b^2-a\,e\,b\,c^2+a\,e\,b\right )}{2\,d}+d\,\ln \left (c+d\,x+1\right )\,\left (\frac {x\,\left (e\,b^2+2\,a\,c\,e\,b\right )}{2\,d}+\frac {a\,b\,e\,x^2}{2}\right )+\frac {a^2\,d\,e\,x^2}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 3.23, size = 238, normalized size = 2.51 \[ \begin {cases} a^{2} c e x + \frac {a^{2} d e x^{2}}{2} + \frac {a b c^{2} e \operatorname {atanh}{\left (c + d x \right )}}{d} + 2 a b c e x \operatorname {atanh}{\left (c + d x \right )} + a b d e x^{2} \operatorname {atanh}{\left (c + d x \right )} + a b e x - \frac {a b e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b^{2} c^{2} e \operatorname {atanh}^{2}{\left (c + d x \right )}}{2 d} + b^{2} c e x \operatorname {atanh}^{2}{\left (c + d x \right )} + \frac {b^{2} c e \operatorname {atanh}{\left (c + d x \right )}}{d} + \frac {b^{2} d e x^{2} \operatorname {atanh}^{2}{\left (c + d x \right )}}{2} + b^{2} e x \operatorname {atanh}{\left (c + d x \right )} + \frac {b^{2} e \log {\left (\frac {c}{d} + x + \frac {1}{d} \right )}}{d} - \frac {b^{2} e \operatorname {atanh}^{2}{\left (c + d x \right )}}{2 d} - \frac {b^{2} e \operatorname {atanh}{\left (c + d x \right )}}{d} & \text {for}\: d \neq 0 \\c e x \left (a + b \operatorname {atanh}{\relax (c )}\right )^{2} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________